/*
 * @Descripttion: 
 * @version: 
 * @Author: turingchang
 * @Date: 2020-08-28 16:08:51
 * @LastEditors: turingchang
 * @LastEditTime: 2020-09-02 17:45:43
 */

const Service = require('egg').Service;

class UserService extends Service {
    async list() {
        const user_list = await this.ctx.model.User.findAll();
        return user_list;
    }
    async get(uid) {
        const user = await this.ctx.model.User.findByPk(uid);
        return user;
    }
    async create(user) {
        const res = await this.ctx.model.User.create(user);
        return res;
    }

    
  
}

module.exports = UserService;